﻿@extends('app')

@section('content')
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">任务发布</div>
					@if ($errors->any())
						  <ul class="alert alert-danger">
							@foreach($errors->all() as $error)
							  <li>{{ $error }}</li>
							@endforeach
						  </ul>
						@endif
						
					<div class="panel-body">
						<ul id="myTab" class="nav nav-tabs">
							<li class="active">
								<a href="/demo/bootstrap-tab-plugin2.htm#home" data-toggle="tab">常规栏目</a>
							</li>
							<li>
								<a href="/demo/bootstrap-tab-plugin2.htm#assist" data-toggle="tab">协助栏目</a>
							</li>
							<li>
								<a href="/demo/bootstrap-tab-plugin2.htm#increment" data-toggle="tab">增值栏目</a>
							</li>
						</ul>
						
						<form class="form-horizontal" role="form" method="POST" action="{{ url('/task/store') }}" enctype="multipart/form-data">
							<input type="hidden" name="_token" value="{{ csrf_token() }}">
							<div id="myTabContent" class="tab-content" style="padding-top:10px;">
							<div class="tab-pane fade in active" id="home">
								<div class="form-group">
									<label class="col-md-1 control-label">名称：</label>
									<div class="col-md-8">
										{{ $old->name }}
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">内容:</label>
									<div class="col-md-8">
									{{ $old->context }}
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">附件:</label>
									<div class="col-md-8">
									{{ $old->attachment }}
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">工期:</label>
									<div class="col-md-8">
										{{ $old->times }}天
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">价格:</label>
									<div class="col-md-8">
									{{ $old->price }}元
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">QQ:</label>
									<div class="col-md-8">
										{{ $old->QQ }}
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">手机号:</label>
									<div class="col-md-8">
									{{ $old->phone }}
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">发票:</label>
									<div class="col-md-8">
										@if ($old->isBill)
											要
										@else
											不要
										@endif
						
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">维护时间</label>
									<div class="col-md-8">
									{{ $old->defend_time }}
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">合同</label>
									<div class="col-md-8">
										@if ($old->isContract)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
							</div>
							<div class="tab-pane fade" id="assist">
								<div class="form-group">
									<label class="col-md-1 control-label">注册商标</label>
									<div class="col-md-8">
										@if ($old->isTrademark)
											要
										@else
											不要
										@endif
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">版权认证</label>
									<div class="col-md-8">
										@if ($old->isCopy)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">软件著作权</label>
									<div class="col-md-8">
										@if ($old->isSoftcopy)
											要
										@else
											不要
										@endif
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">域名申请</label>
									<div class="col-md-8">
										@if ($old->isDomain)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">APP上传</label>
									<div class="col-md-8">
									<?php
										switch($old->isApp){
											case 0:echo '不要';break;
											case 1:echo '苹果公账号';break;
											case 2:echo '苹果独立账号';break;
											case 3:echo '安卓上传';break;
										}
									?>
										
									</div>
								</div>

								
							</div>
							<div class="tab-pane fade" id="increment">
								<div class="form-group">
									<label class="col-md-1 control-label">加急</label>
									<div class="col-md-8">
										@if ($old->isUrgent)
											要
										@else
											不要
										@endif
									
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">屏蔽搜索</label>
									<div class="col-md-8">
										@if ($old->isSeach)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">置顶</label>
									<div class="col-md-8">
										@if ($old->isTop)
											要
										@else
											不要
										@endif
										
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">隐藏方案</label>
									<div class="col-md-8">
										@if ($old->isHide)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-1 control-label">需求编写</label>
									<div class="col-md-8">
										@if ($old->isDemand)
											要
										@else
											不要
										@endif
									
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-1 control-label">首页推荐</label>
									<div class="col-md-8">
										@if ($old->isHome)
											要
										@else
											不要
										@endif
										
									</div>
								</div>
							</div>
							</div>
							
							<div class="form-group">
								<div class="col-md-8 col-md-offset-4">
									<button type="submit" class="btn btn-primary">返回</button>
								</div>
							</div>
						</form>
						
					</div>
				</div>
			</div>
		</div>
	</div>
	
@endsection
<script src="{{ asset('/js/jquery.min.js') }}"></script>
<script src="{{ asset('/js/fileinput.js')}}" type="text/javascript"></script>
<script src="{{ asset('/js/fileinput_locale_zh.js')}}" type="text/javascript"></script>
<script>
   $(function(){
      $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
      // Get the name of active tab
      var activeTab = $(e.target).text(); 
      // Get the name of previous tab
      var previousTab = $(e.relatedTarget).text(); 
      $(".active-tab span").html(activeTab);
      $(".previous-tab span").html(previousTab);
   });
});
</script>
